import moment from "moment";

export const now = () => {
    return moment().valueOf();
}

export const format = (date, format = 'YYYY-MM-DD HH:mm:ss') => {
    return moment(date).format(format);
}

export const diff = (date1, date2, unit = 'seconds') => {
    return moment(date1).diff(moment(date2), unit);
}

export const Date = moment